/**
 * 
 */
package com.EstateManager.Dao;

import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.EstateManager.Entity.Admin;
import com.EstateManager.Entity.Estateinfocheck;

/**
 * 创建时间 : 上午10:50:25
 * @author Yonggang Liu
 *
 * EstateInfkCheckDao.java
 */
@Repository("estateInfoCheckDao")
public class EstateInfoCheckDao implements IModelBasicOperate<Estateinfocheck, Integer> {

	@Autowired
	SessionFactory sessionFactory;
	
	private Session getCurrenrSession() {
		return sessionFactory.getCurrentSession();
	}
	
	@Override
	public Estateinfocheck load(Integer id) throws HibernateException {
		return (Estateinfocheck)this.getCurrenrSession().load(Estateinfocheck.class, id);
	}

	@Override
	public Estateinfocheck get(Integer id) throws HibernateException {
		return (Estateinfocheck)this.getCurrenrSession().get(Estateinfocheck.class, id);
	}

	@Override
	public void persist(Estateinfocheck entity) throws HibernateException {
		this.getCurrenrSession().persist(entity);
	}

	@Override
	public Integer save(Estateinfocheck entity) throws HibernateException {
		return (Integer)this.getCurrenrSession().save(entity);
	}

	@Override
	public void saveOrUpdate(Estateinfocheck entity) throws HibernateException {
		this.getCurrenrSession().saveOrUpdate(entity);
	}

	
	/* (non-Javadoc)
	 * @see com.EstateManager.Dao.IModelBasicOperate#detete(java.lang.Object)
	 */
	@Override
	public void detete(Estateinfocheck entity) throws HibernateException {
		this.getCurrenrSession().delete(entity);
		
	}

	
	@Override
	public void flush() throws HibernateException {
		this.getCurrenrSession().flush();
	}
	
	@Override
	public void update(Estateinfocheck t) throws HibernateException {
		this.getCurrenrSession().update(t);
	}


	@Override
	public void merge(Estateinfocheck t) throws HibernateException {
		this.getCurrenrSession().merge(t);
	}

}
